<div class="title">Phân quyền người dùng</div>
<?php echo $this->Form->create('System', array('action' => 'phanCong')); ?>
<table width="100%" cellspacing="0">
	<tr>
		<th>STT</th>
		<th>User</th>
		<?php foreach ($acs as $key => $ac): ?>
		<th><?php echo $ac['Acpermission']['ten'] ?></th>
		<?php endforeach ?>
		
		<?php foreach ($users as $key => $user): ?>
		<tr>
			<td><?php echo $key + 1;?></td>
			<td><?php echo $user['User']['username'];?></td>
			
			<?php foreach ($acs as $key => $ac): ?>
			<td align="center"><?php echo $this->Form->input($ac['Acpermission']['alias']."_".$user['User']['username'], array('div' => false, 'type' => 'checkbox','label' => false));?></td>
			<?php endforeach ?>
		</tr>
		<?php endforeach ?>
	</tr>
</table>
<br/>
<input type="submit" value="Lưu"/>
<?php echo $this->Form->end(); ?>